﻿# -*- coding:utf-8 -*-
#
# Система учета компьютерной техники  
# Структура предприятия
#
from django.conf.urls.defaults import *


urlpatterns = patterns('',
    url('^$',                               'shm.views.index',              name="shm_index"),
    
    
    url(r'^adressbook/$',                   'shm.views.index',              name="adressbook_index"),
    url(r'^adressbook/(\d+)/$',             'shm.views.dep_list',           name="adressbook_department"),
    url(r'^adressbook/(\d+)/detail/(\d+)/$','shm.views.employee_list',      name="adressbook_department_detail"), 
    url(r'^adressbook/letter/(\d+)/$',      'shm.views.addressbook_employee_letter', name="addressbook_employee_letter"), 
    
    
    #url('^$', 'shm.views.index', name="shm_index"),
    #url(r'^dep/(\d+)/$', 'shm.views.dep_list', name="department_tree"),
    #url(r'^dep/(\d+)/detail/(\d+)/$', 'shm.views.employee_list', name="department_detail"),
    #url(r'^dep/(\d+)/$',                    'shm.views.dep_list',           name="department_tree"),

    
    url(r'^department/detail/(\d+)/$',      'shm.views.department_detail',  name="department_detail"),
    url(r'^department/$',                   'shm.views.department_tree',    name="department"),
    url(r'^department/(\d+)/$',             'shm.views.department_tree_ch', name="department_children"),
    url(r'^department/employee/update/(\d+)/$',   'shm.views.department_employee_update', name="department_employee_update"),
  
)


